//
//  XMN_ILView.m
//  B段项目
//
//  Created by dllo on 15/11/3.
//  Copyright © 2015年 谢美娜. All rights reserved.
//

#import "XMN_ILView.h"

@implementation XMN_ILView

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _leftImageView = [[UIImageView alloc]init];
        [self addSubview:_leftImageView];
        _rightLabel = [[UILabel alloc]init];
        _rightLabel.font = [UIFont systemFontOfSize:13];
        _rightLabel.textColor = [UIColor lightGrayColor];
        [self addSubview:_rightLabel];
    }
    return self;
}

-(void)layoutSubviews{
    _leftImageView.frame = CGRectMake(5, 2.5, self.frame.size.height - 5, self.frame.size.height - 5);
    _rightLabel.frame =CGRectMake(_leftImageView.frame.origin.x + _leftImageView.frame.size.width + 5, 2.5, self.frame.size.width - _leftImageView.frame.size.width - 15, self.frame.size.height - 5);
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
